<?php
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-edit.php");

?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>

</head>

<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>

<div id="container" class="member">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>


        <div id="content">




            <div class="box department-add-box layui-form">
            <?php $page_title='部门信息';?>
            <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>





                <form id="edit-department-form" method="post" action="detail-edit-function.php?nav-itemed=department" enctype="multipart/form-data" >



                        <div class="layui-form-item">
                            <label class="layui-form-label">部门名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" required  lay-verify="required" placeholder="请输入部门名称" value="<?echo $detail['name']?>" autocomplete="off" class="layui-input">
                            </div>
                        </div>


                        <!-- <div class="layui-form-item">
                            <label class="layui-form-label">建立日期</label>
                            <div class="layui-input-block">

                                <input type="text" name="builddate" id="date" autocomplete="off"  placeholder="请输入建立日期" class="layui-input"  value="<? echo $detail['builddate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                            </div>
                        </div> -->




                        <?
                        $principal_list=select_lines_all_items($table_Prefix."employee","nid desc","","0");
                        $principal=select_one_line_all_items($table_Prefix."employee","nid = '".$detail['principal']."'");
                        ?>

                        <div class="layui-form-item">
                            <label class="layui-form-label">负责人</label>
                            <div class="layui-input-block">
                                <select name="principal" lay-search="">

                                    <option value="<?echo $detail['principal']?>" > <? echo $detail['principal'] ?> : <? echo $principal['name'] ?></option>
                                    <option  value="无" > 无</option>

                                    <? for($i=0;$i<count($principal_list);$i++){ ?>
                                        <option value="<? echo $principal_list[$i]['nid'] ?>"><? echo $principal_list[$i]['nid'] ?> : <? echo $principal_list[$i]['name'] ?></option>
                                    <? } ?>
                                </select>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">当前状态</label>
                            <div class="layui-input-block">
                                <input type="radio" name="status" value="启用" title="启用" <? if($detail['status']=="启用"){echo "checked";} ?>>
                                <input type="radio" name="status" value="关闭" title="关闭" <? if($detail['status']=="关闭"){echo "checked";} ?>>
                            </div>
                        </div>


                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <textarea name="remark" placeholder="备注" class="layui-textarea"><?echo $detail['remark']?></textarea>
                            </div>
                        </div>



                            <input type="hidden" name="nid" value="<?echo $detail['nid']?>"  >






                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>





            </div>



            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>








<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>
